<?php if($paginationLinks): ?>
    <div id="<?php echo $id; ?>"<?php if($class) echo ' class="'.$class.'"'; ?>>
    <?php if($toBeginLink) echo $toBeginLink; ?>
    <?php if($pervLink) echo $pervLink; ?>
        <?php foreach($paginationLinks as $link): ?>
            <?php echo $link; ?>
        <?php endforeach; ?>
    <?php if($nextLink) echo $nextLink; ?>
    <?php if($toEndLink) echo $toEndLink; ?>
    </div>
<?php endif; ?>